ip netns delete ns1
ip link delete dev br0
ip link delete dev veth1

ip netns add ns1
ip link add dev veth0 type veth peer name veth1
ip link add dev br0 type bridge
ip link set dev veth1 master br0

ip addr add 192.168.5.1/24 dev br0
ip link set dev veth1 up
ip link set dev br0 up

ip link set dev veth0 netns ns1
ip netns exec ns1 ip addr add 192.168.5.5/24 dev veth0
ip netns exec ns1 ip link set dev veth0 up
ip netns exec ns1 ip link set lo up
ip netns exec ns1 ip route add default via 192.168.5.1 dev veth0

echo 1 > /proc/sys/net/ipv4/ip_forward
#iptables -t nat -A POSTROUTING -s 192.168.5.0/24 -j SNAT --to-source 192.168.2.218
#记住conntrack -D可以把内核自动构建的返回印射条目刷新